<template>
  <div class="hamburger-container"
       @click="changeSidebarOpened">
    <svg-icon :icon="icon"
              class="hamburger"
              id="guide-hamburger"></svg-icon>
  </div>
</template>

<script setup>
const { useAppStore } = require("@/store/app");
const { computed } = require("vue");

const appStore = useAppStore();

const icon = computed(() => appStore.sidebarOpened ? 'hamburger-opened' : 'hamburger-closed')

const changeSidebarOpened = () => {
  appStore.changeSidebarOpened();
}
</script>

<style lang="scss" scoped>
.hamburger-container {
  padding: 0 16px;

  .hambuerger {
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
  }
}
</style>